package com.huilan.controller;

import com.huilan.service.DubboService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ghy
 * @date 2019-04-09 13:36
 **/
@RestController
@RequestMapping("/dubbo")
public class DubboController {

    @Reference
    private DubboService dubboService;

    @RequestMapping("/test/{name}")
    public String dubboTest(@PathVariable("name") String name){
        return dubboService.getName(name);
    }
}
